<template>
	<view class="cook-item">
		<image class="img" :src="person.imgUrl"></image>
		<view class="info">
			<view class="title">{{person.title}}</view>
			<uni-rate :value="person.score" size="12"></uni-rate>
		</view>
	</view>
</template>

<script>
	// 1. 把子页面import
	import UniRate from '@/uni_modules/uni-rate/components/uni-rate/uni-rate.vue'
	// 2. 注册为组件
	
	export default {
		/* 注册为组件 */
		components: {
			UniRate
		},
		
		props :{
			person: {
				type:Object,
				default:()=>([])
			}
		},
		/* 子页面自己的数据 */
		data() {
			return {
				
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="less">
	.cook-item {
		margin: 0 10px;
		display: flex;
		flex-direction: column;
		padding: 10px;
		align-items: center;
		width: 180rpx;
		height: 250rpx;
		background-color: #FFFFFF;
		box-shadow: 2px 2px 5px #ccc;
	
		image {
			flex: 0 0 160rpx;
			width: 160rpx;
			border-radius: 50%;
			margin-bottom: 10px;
		}
	
		.info {
			flex: 1;
			font-size: 12px;
			text-align: center;
			width: 100%;
	
			.title {
				margin-bottom: 5px;
			}
	
			.rate {
				display: flex;
				justify-content: center;
				align-items: center;
			}
		}
	}
</style>